<template>
	<view class="sbResult">
		<!-- 申报成功或失败 -->
		<view class="sbJg" v-if="result">
			<view class="title">
				<uni-icons custom-prefix="custom-icon" type="checkbox" size="30" class="cg"></uni-icons>
				<text>申报成功，请清缴税费。</text>
			</view>
			<view class="bcjkcg">个人出租屋税费申报成功，您可以选择清缴税款或返回税务中心查看其它功能。</view>
			<view class="btn">
				<button type="primary" size="mini" @click="goQj" class="qrbtn">去清缴</button>
				<button type="default" plain="true" size="mini" @click="fhsy" class="fhsybtn">返回首页</button>
			</view>
		</view>
		<!-- 申报成功或失败 -->
		<view class="sbJg" v-else>
			<view class="title">
				<uni-icons custom-prefix="custom-icon" type="close" size="30"></uni-icons>
				<text>申报失败</text>
			</view>
			<view class="bcjkcg">个人出租屋税费申报失败，请返回税务中心重新申报。</view>
			<view class="btn">
				<button type="default" plain="true" size="mini" @click="fhsy">返回首页</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				result: false,
				sbxx:""
			}
		},
		onLoad(e) {
			if (e.result == "success") {
				this.result = true
				this.sbxx=e.sbxx
			} else {
				this.result = false
			}
		},
		methods: {
			// 清缴失败
			fhsy() {
				this.$commonCzwjs.goPage({
					url: "/pages/index/index"
				})
			},
			// 去清缴
			goQj(){
				uni.redirectTo({
					url: "/pages/sfqj/dqj?type=sfsb&sbxx="+this.sbxx
				})
			} 
		}
	}
</script>

<style>
	.sbResult {
		background: #ffffff;
	}

	.sbJg {
		padding: 10rpx;

	}

	.title {
		height: 80rpx;
		display: flex;
		align-items: center;
	}

	.title text {
		font-size: 40rpx;
		color: black;
		font-weight: bold;
		letter-spacing: 2rpx;
	}

	.uni-icons {
		color: red !important;

	}

	.cg {
		color: #12b612 !important;
	}

	.bcjkcg {
		padding: 40rpx;
		font-size: 26rpx;
	}

	.btn {
		text-align: center;
		padding: 40rpx;
	}

	.qrbtn {
		background-color: #3171d5;
		font-size: 36rpx;
	}
	.btn{
		width: 100%;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.btn uni-button {
		width: 260rpx;
		height: 70rpx;
		line-height: 70rpx;
		margin: 20rpx;
	}
	.fhsybtn{
		font-size: 20rpx !important;
	}
	.fhsybtn {
		width: 170rpx !important;
		height: 50rpx !important;
		line-height: 50rpx !important;
	}
</style>